<template>
  <div class="admin-container">
    <div class="container">
      <div class="admin">
        <div class="menu">
          <el-container style="height: 900px; border: 1px solid #eee">
            <el-aside>
              <el-menu
                default-active="2"
                class="el-menu-vertical-demo"
                router>
                <el-submenu index="1">
                  <template slot="title">
                    <i class="el-icon-location"></i>
                    <span>商品管理</span>
                  </template>
                    <el-menu-item index="/admin/all">全部</el-menu-item>
                    <el-menu-item index="/admin/learn">学习</el-menu-item>
                    <el-menu-item index="/admin/zhoubian">周边</el-menu-item>
                    <el-menu-item index="/admin/shenqi">神器</el-menu-item>
                    <el-menu-item index="/admin/shuma">数码</el-menu-item>
                    <el-menu-item index="/admin/fushi">服饰</el-menu-item>
                    <el-menu-item index="/admin/qita">其它</el-menu-item>
                </el-submenu>
                <el-menu-item index="/login">
                  <i class="el-icon-menu"></i>
                  <span slot="title" @click="logout">注销</span>
                </el-menu-item>
              </el-menu>
            </el-aside>
            <el-container>
              <el-main>
                <router-view/>
              </el-main>
            </el-container>
          </el-container>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  methods:{
    logout() {
      console.log(localStorage.getItem('adminor'));
      localStorage.clear()
    }
  }
}
</script>

<style scoped>

</style>